/*
 * Created on 08.11.2006 14:36:38 Author: Josef Schneeberger (josef.schneeberger@fh-deggendorf.de)
 */
package pms.om;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.sql.Blob;
import com.mysql.jdbc.BlobFromLocator;
import com.sun.swing.internal.plaf.basic.resources.basic;

/**
 * @author josef@dr-schneeberger.de
 */
@Entity
@Table(name = "tbl_image")
public class Image {
    @Id
    @GeneratedValue
	@Column(name = "pk_image")
	private int id;
    private String name;
    private int raum;
    private String klasse;
    private byte[] Picture1;
    private byte[] Picture2;
    private byte[] Picture3;
    private byte[] Picture4;
    private byte[] Picture5;
    private byte[] Picture6;
    private byte[] Picture7;
    private byte[] Picture8;
    private byte[] Picture9;
    private byte[] Picture10;
    private byte[] Picture11;
    private byte[] Picture12;
    private byte[] Picture13;
    private byte[] Picture14;
    private byte[] Picture15;
    private byte[] Picture16;
    
    
	@OneToMany(mappedBy = "image")
	private Set<BewDat> BewDatenImg;

    
	public Image() {
    }
    
    @Override
    public boolean equals(Object o) {
    	return id == ((Image) o).getId();
    }

    public Image(String n , String k, int s ,byte[] pic1,  byte[] pic2, 
			 byte[] pic3,  byte[] pic4,  byte[] pic5, byte[] pic6 ,byte[] pic7,  byte[] pic8,  byte[] pic9,
			 byte[] pic10,  byte[] pic11,  byte[] pic12,  byte[] pic13,  byte[] pic14,  byte[] pic15, byte[] pic16) {
    	name = n;
    	klasse = k;
    	raum = s;
    	Picture1 = pic1;
    	Picture2 = pic2;
    	Picture3 = pic3;
    	Picture4 = pic4;
    	Picture5 = pic5;
    	Picture6 = pic6;
    	Picture7 = pic7;
    	Picture8 = pic8;
    	Picture9 = pic9;
    	Picture10 = pic10;
    	Picture11 = pic11;
    	Picture12 = pic12;
    	Picture13 = pic13;
    	Picture14 = pic14;
    	Picture15 = pic15;
    	Picture16 = pic16;
    	
	}

	public Image(String n) {
    	name = n;
    	klasse = "";
    	raum = 1;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getraum() {
		return raum;
	}

	public void setraum(int raum) {
		this.raum = raum;
	}

	public String getKlasse() {
		return klasse;
	}

	public void setKlasse(String klasse) {
		this.klasse = klasse;
	}

	public Set<BewDat> getBewDatenImg() {
		return BewDatenImg;
	}

	public void setBewDatenImg(Set<BewDat> bewDatenImg) {
		BewDatenImg = bewDatenImg;
	}
	/*public Blob getBild() {
		return bild;
	}

	public void setBild(Blob bild) {
		this.bild = bild;
	}*/

	public byte[] getPicture1() {
		return Picture1;
	}

	public void setPicture1(byte[] picture1) {
		Picture1 = picture1;
	}

	public byte[] getPicture2() {
		return Picture2;
	}

	public void setPicture2(byte[] picture2) {
		Picture2 = picture2;
	}

	public byte[] getPicture3() {
		return Picture3;
	}

	public void setPicture3(byte[] picture3) {
		Picture3 = picture3;
	}

	public byte[] getPicture4() {
		return Picture4;
	}

	public void setPicture4(byte[] picture4) {
		Picture4 = picture4;
	}

	public byte[] getPicture5() {
		return Picture5;
	}

	public void setPicture5(byte[] picture5) {
		Picture5 = picture5;
	}

	public byte[] getPicture6() {
		return Picture6;
	}

	public void setPicture6(byte[] picture6) {
		Picture6 = picture6;
	}

	public byte[] getPicture7() {
		return Picture7;
	}

	public void setPicture7(byte[] picture7) {
		Picture7 = picture7;
	}

	public byte[] getPicture8() {
		return Picture8;
	}

	public void setPicture8(byte[] picture8) {
		Picture8 = picture8;
	}

	public byte[] getPicture9() {
		return Picture9;
	}

	public void setPicture9(byte[] picture9) {
		Picture9 = picture9;
	}

	public byte[] getPicture10() {
		return Picture10;
	}

	public void setPicture10(byte[] picture10) {
		Picture10 = picture10;
	}

	public byte[] getPicture11() {
		return Picture11;
	}

	public void setPicture11(byte[] picture11) {
		Picture11 = picture11;
	}

	public byte[] getPicture12() {
		return Picture12;
	}

	public void setPicture12(byte[] picture12) {
		Picture12 = picture12;
	}

	public byte[] getPicture13() {
		return Picture13;
	}

	public void setPicture13(byte[] picture13) {
		Picture13 = picture13;
	}

	public byte[] getPicture14() {
		return Picture14;
	}

	public void setPicture14(byte[] picture14) {
		Picture14 = picture14;
	}

	public byte[] getPicture15() {
		return Picture15;
	}

	public void setPicture15(byte[] picture15) {
		Picture15 = picture15;
	}

	public byte[] getPicture16() {
		return Picture16;
	}

	public void setPicture16(byte[] picture16) {
		Picture16 = picture16;
	}

	
	
	
	
	
}
